public class ComputeFact
{
   /**
      A method to compute n factorial (n!) recursively
      @param n a number >= 0
      @return the value of n!
   */
   public static int factorial(int n)
   {
      // your work here 
      int sum=1;
      if(n==0){
         sum=1;
      }
      for(int i=2;i<=n;i++){
         sum=sum*i;
      }
      return sum;
   }
}